Improve instrumentation and gen_ai spec adherence#222
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
anbuzin
force-pushed
the
improve-gen-ai-spec
branch
from
July 21, 2026 21:20
a1930e3 to
830404e
Compare
anbuzin
force-pushed
the
durable-telemetry-2
branch
from
July 22, 2026 17:21
023dbd1 to
69075d8
Compare
anbuzin
force-pushed
the
improve-gen-ai-spec
branch
from
July 22, 2026 17:30
830404e to
67f80f3
Compare
msullivan
approved these changes
Jul 22, 2026
| return attrs | ||
|
|
||
|
|
||
| def _hack_get_field(obj: Any, name: str) -> Any: |
Contributor
There was a problem hiding this comment.
just call it _get_field, probably?
what's the cause here though? sometimes we have objects and sometimes dicts?
Collaborator
Author
There was a problem hiding this comment.
it's because of the span.py:111 import hack:
if TYPE_CHECKING:
...
# 1. RunSpanData and friends are pydantic models. RunSpanData.params is
# typed as InferenceRequestParams.
# 2. InferenceRequestParams.sampling (and other fields) have
# a ModelProviderDefault annotation.
# 3. ModelProviderDefault is a plain setinel class that causes pydantic to
# freak out when building a schema.
# also, importing without a guard would cause a circular import
# in models/core/api.py
_InferenceParams = params_.InferenceRequestParams
_GenerateParams = params_.GenerateParams
else:
_InferenceParams = Any
_GenerateParams = Any
Collaborator
Author
There was a problem hiding this comment.
there're ways i could try and fix it in a followup pr. if i succeed, we'll be able to delete this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.